<html>
<head><meta charset="utf-8"><title>const transmute broken on nightly · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html">const transmute broken on nightly</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211160097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211160097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211160097">(Sep 24 2020 at 16:59)</a>:</h4>
<p>Use of <code>transmute</code> in <code>const fn</code> seems to be broken on nightly: <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=4a4a360cc1d39b7c5df7edef210a0c2d">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=4a4a360cc1d39b7c5df7edef210a0c2d</a></p>



<a name="211160135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211160135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211160135">(Sep 24 2020 at 16:59)</a>:</h4>
<p>It complains that the <code>const_fn</code> feature must be enabled even though it is already enabled.</p>



<a name="211160255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211160255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211160255">(Sep 24 2020 at 17:00)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="118594">@ecstatic-morse</span> I think you are working on refactoring this rn</p>



<a name="211160575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211160575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211160575">(Sep 24 2020 at 17:03)</a>:</h4>
<p>I'll open an issue for this.</p>



<a name="211160656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211160656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211160656">(Sep 24 2020 at 17:04)</a>:</h4>
<p>Ah it seems that it requires the <code>const_fn_transmute</code> feature.</p>



<a name="211161786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211161786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211161786">(Sep 24 2020 at 17:13)</a>:</h4>
<p>Yeah, I forgot to update some suggestions in a refactor. <a href="https://github.com/rust-lang/rust/issues/77134">#77134</a> is another instance of this.</p>



<a name="211162131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211162131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211162131">(Sep 24 2020 at 17:16)</a>:</h4>
<p>PR will go up shortly.</p>



<a name="211162170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/const%20transmute%20broken%20on%20nightly/near/211162170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/const.20transmute.20broken.20on.20nightly.html#211162170">(Sep 24 2020 at 17:16)</a>:</h4>
<p>Sorry for the trouble.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>